package Day07_21;

public class Test_noname_internal_Class {
    public static void main(String[] args) {
   // Computer c1 = new Computer();
        Computer c1 = new MyComputer();
        MyMath m1 = new MyMath();
        m1.mySum(new MyComputer(),100,200);
//        System.out.println(   m1.mySum( new Computer(){ //{}后面对代表了对接口的实现！！！！！！！！！！
//            @Override
//            public int sum(int a, int b) {
//                return a+b ;
//            }
//        },100,200) );
    }
}
interface Computer{
    int sum(int a,int b);
}


class MyComputer implements Computer{
    public int sum(int a,int b){
        return a+b;
    }

}

class MyMath{
    public int  mySum( Computer c,int a,int b){
        return c.sum(a,b);
    }
}
